Skip to content

Conversation

@bgravenorst
Copy link
Contributor

@bgravenorst bgravenorst commented Dec 2, 2025

Description

Fixes an issue where the Table of Contents (ToC) "On this page" section was getting hidden behind the sticky SubNavBar when scrolling on Embedded Wallets pages.

  • Updated the ToC selector to use [class*='tableOfContents'] for better CSS modules compatibility
  • Added a conditional CSS rule using :has() to increase the ToC offset only when the SubNavBar is present

Issue(s) fixed

Fixes #2545

Preview

https://metamask-docs-git-doc-2545-consensys-ddffed67.vercel.app/smart-accounts-kit

Checklist

  • If this PR updates or adds documentation content that changes or adds technical meaning, it has received an approval from an engineer or DevRel from the relevant team.
  • If this PR updates or adds documentation content, it has received an approval from a technical writer.

Note

Switches ToC styling to a CSS-modules-safe selector and increases sticky top offsets, with a larger offset when a SubNavBar is present.

  • Styles (ToC):
    • Replace specific module class with [class*='tableOfContents'] for CSS modules compatibility in src/scss/theme/_toc.scss.
    • Increase sticky top offset from var(--ifm-navbar-height) + 2rem to + 4rem.
    • Add conditional rule body:has([class*='subNavBar']) [class*='tableOfContents'] { top: calc(var(--ifm-navbar-height) + 9rem) } to clear the SubNavBar.

Written by Cursor Bugbot for commit 6d4b19c. This will update automatically on new commits. Configure here.

@bgravenorst bgravenorst requested review from a team as code owners December 2, 2025 22:53
@vercel
Copy link

vercel bot commented Dec 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
metamask-docs Ready Ready Preview Comment Dec 10, 2025 9:07pm

Copy link
Member

@shahbaz17 shahbaz17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bgravenorst bgravenorst merged commit 1e8ad93 into main Dec 10, 2025
17 of 18 checks passed
@bgravenorst bgravenorst deleted the DOC-2545 branch December 10, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TOC hides under secondary nav on scroll

3 participants